home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kparts / browserinterface.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  1.4 KB  |  55 lines

  1. #ifndef __browserinterface_h__
  2. #define __browserinterface_h__
  3.  
  4. #include <qobject.h>
  5. #include <qvariant.h>
  6.  
  7. #include <kdelibs_export.h>
  8.  
  9. namespace KParts
  10. {
  11.  
  12. /**
  13.  * The purpose of this interface is to allow a direct communication between
  14.  * a KPart and the hosting browser shell (for example Konqueror) . A
  15.  * shell implementing this interface can propagate it to embedded kpart
  16.  * components by using the setBrowserInterface call of the part's
  17.  * KParts::BrowserExtension object.
  18.  *
  19.  * This interface looks not very rich, but the main functionality is
  20.  * implemented using the callMethod method for part->shell
  21.  * communication and using Qt properties for allowing a part to
  22.  * to explicitly query information from the shell.
  23.  *
  24.  * Konqueror in particular, as 'reference' implementation, provides
  25.  * the following functionality through this interface:
  26.  *
  27.  * Qt properties:
  28.  * <code>
  29.  * Q_PROPERTY( uint historyLength READ historyLength );
  30.  * </code>
  31.  *
  32.  * Callable methods:
  33.  * <code>
  34.  * void goHistory( int );
  35.  * </code>
  36.  *
  37.  */
  38. class KPARTS_EXPORT BrowserInterface : public QObject
  39. {
  40.     Q_OBJECT
  41. public:
  42.     BrowserInterface( QObject *parent, const char *name = 0 );
  43.     virtual ~BrowserInterface();
  44.  
  45.     /**
  46.      * Perform a dynamic invocation of a method in the BrowserInterface
  47.      * implementation. Methods are to be implemented as simple Qt slots.
  48.      */
  49.     void callMethod( const char *name, const QVariant &argument );
  50. };
  51.  
  52. }
  53.  
  54. #endif
  55.